//
//  PlayVideoOperation.m
//  VMIX
//
//  Created by jeffs on 5/24/10.
//  Copyright 2010 Vmix Media, INC. All rights reserved.
//

#import "PlayVideoOperation.h"
#import "VmixAppDelegate.h"
#import "VmixCollection.h"

@implementation PlayVideoOperation
@synthesize playData, playApi, delegate, playUrl;

- (void)main {
	
	NSURL *url = [NSURL URLWithString: self.playApi];
	CXMLDocument *playParser = [[[CXMLDocument alloc] initWithContentsOfURL:url options:0 error:nil] autorelease];
	CXMLNode *firstNode = [playParser childAtIndex:0];
	self.playUrl = [NSURL URLWithString: [firstNode getElementValue:@"file" error:nil]];
	
	[self.delegate didFinishParsingPlayData:self.playUrl];
	
}


@end
